﻿<%@ Page Language="C#" MasterPageFile="~/Provider/CarInsurance/Liberty_CarInsurance.master"
    AutoEventWireup="true" CodeFile="ProviderCarYear.aspx.cs" MaintainScrollPositionOnPostback="true"
    Inherits="Provider_CarInsurance_ProviderCarYear" Title="Car - Vehicle Year" %>

<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
 <script src="~/controls/CE_Date.js" type="text/javascript"></script>
    <div class="provider_inner">
        <h1>
            Vehicle Year
            <asp:Label ID="lblProviderCarYearId" runat="server" Text=""></asp:Label></h1>
        <fieldset>
            <dl>
                <dt>
                    <label>
                        From Year</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlFromYear" runat="server" AutoPostBack="false" OnSelectedIndexChanged="ddlFromYear_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvFromYear" runat="server" ControlToValidate="ddlFromYear"
                        InitialValue="-1" ErrorMessage="Select start year value." ValidationGroup="caryear"
                        Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="csvYear" OnServerValidate="CheckStartYear" runat="server"
                        ControlToValidate="ddlFromYear" ValidationGroup="caryear" ErrorMessage="Start year value should not greater than end year value."></asp:CustomValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        To Year</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlToYear" runat="server" AutoPostBack="false" OnSelectedIndexChanged="ddlToYear_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvToYear" runat="server" ControlToValidate="ddlToYear"
                        InitialValue="-1" ErrorMessage="Select end year value." ValidationGroup="caryear"
                        Display="Dynamic"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Your Cover Type</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlCoverType" runat="server" AutoPostBack="false" OnSelectedIndexChanged="ddlCoverType_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvCoverType" runat="server" ControlToValidate="ddlCoverType"
                        InitialValue="-1" ErrorMessage="Select your coverage type." ValidationGroup="caryear"
                        Display="Dynamic"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                       Current Rate</label></dt>
                <dd>
                    <asp:TextBox ID="txtCoverageRate" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvCoverageRate" runat="server" ControlToValidate="txtCoverageRate"
                        ErrorMessage="Enter your rate." ValidationGroup="caryear" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revCoverageRate" runat="server" ControlToValidate="txtCoverageRate"
                        ErrorMessage="Rate value is not valid." ValidationGroup="caryear" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </dd>
            </dl>
             <dl>
                <dt>
                    <label>
                        Schedule Rate Update</label></dt>
                <dd>
                   <asp:RadioButtonList runat="server" ID="rdoEffectivity"  RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged="EffectiveWhen">
                   <asp:ListItem Value="Yes">Yes</asp:ListItem>
                   <asp:ListItem Value="No">No</asp:ListItem>                   
                   </asp:RadioButtonList>
                  
                </dd>
            </dl>
            <div id="divNewRate" runat="server" visible="false">
             <dl>
                <dt>
                    <label>
                        Effectivity Date</label></dt>
                <dd>
                   <uc1:usrDate ID="usrEffectivityDate" ValidationGroup="caryear" runat="server" IsNotLessThanToday="true" />
                  
                </dd>
            </dl>
            
             <dl>
                <dt>
                    <label>
                        New Rate</label></dt>
                <dd>
                    <asp:TextBox ID="txtNewRate" runat="server" MaxLength="5"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvNewRate" runat="server" ControlToValidate="txtNewRate"
                        ErrorMessage="Enter new rate." Display="Dynamic" ValidationGroup="caryear"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revNewRate" runat="server" ControlToValidate="txtNewRate"
                        ErrorMessage="Rate is not valid." ValidationGroup="caryear" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </dd>
            </dl>
            </div>
            <dl>
                <dt>
                    <label>
                        Status</label></dt>
                <dd>
                    <asp:CheckBox ID="chkStatus" runat="server" />
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Auth Code</label></dt>
                <dd>
                    <asp:TextBox ID="txtAuthCode" runat="server" TextMode="Password" MaxLength="12" Width="150px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAuthCode" runat="server" ControlToValidate="txtAuthCode"
                        ErrorMessage="Enter auth code." ValidationGroup="caryear"></asp:RequiredFieldValidator>
                </dd>
            </dl>
        </fieldset>
        <fieldset class="action">
            <asp:ImageButton OnClientClick="javascript:return confirm('Are you sure to go back?');"
                ID="ibtBack" runat="server" CssClass="left_btn" ImageUrl="~/Provider/images/buttons/back1.gif"
                OnClick="ibtBack_Click" />
            <asp:ImageButton ID="ibtSubmit" ValidationGroup="caryear" runat="server" CssClass="float_btn"
                ImageUrl="~/Provider/images/buttons/submit1.gif" OnClick="ibtSubmit_Click" />
            <asp:ImageButton ID="btnNew" runat="server" CssClass="floatnext_btn" OnClientClick="return confirm('Are you sure to clear form?');"
                ImageUrl="~/Provider/images/buttons/new1.gif" OnClick="btnNew_Click" />
            <asp:ImageButton ID="btnDelete" runat="server" CssClass="floatnext_btn" ImageUrl="~/Provider/images/buttons/delete1.gif"
                OnClientClick="return confirm('Are you sure you want to remove this record?');"
                OnClick="btnDelete_Click" />
        </fieldset>
        <asp:Label ID="lblMessage" runat="server" CssClass="successmsg"></asp:Label>
    </div>
</asp:Content>
